<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>书架</title>
		<link rel="stylesheet" type="text/css" href="css/style.css" />
		<link rel="stylesheet" type="text/css" href="css/aui.css" />
		<link rel="stylesheet" type="text/css" href="css/iconfont/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
		<script src="js/art-template.js" type="text/javascript" charset="utf-8"></script>

		<!--<script src="//s.url.cn/qqun/qun/qqweb/m/qun/confession/js/vconsole.min.js"></script>-->

		<script type="text/javascript">
			document.writeln("<script type=\"text/javascript\" src=\"js/common.js?"+ Math.random() + "\"></scr"+"ipt>");
		</script>
		<style>
			#footer{  background-color: #f2f2f2; }
	        #footer ul li{ background: url() no-repeat center 5px; text-align: center; color: #666666;}
	        #footer ul li.active{ color: #282828; }
	        #footer ul li:nth-child(1){ background-image: url(icon/home.png); }
	        #footer ul li:nth-child(2){ background-image: url(icon/buy.png); }
	        #footer ul li:nth-child(3){ background-image: url(icon/me.png); }
	        #footer ul li:nth-child(1).active{ background-image: url(icon/home_hover.png); }
	        #footer ul li:nth-child(2).active{ background-image: url(icon/buy_hover.png); }
	        #footer ul li:nth-child(3).active{ background-image: url(icon/me_hover.png); }
			
			#tabbar {
				text-align: center;
				padding: 10px 0 0 0;
				height: auto
			}
			
			.tab {
				align: center;
				height: 3.5rem;
				line-height: 3rem;
				font-weight: 500;
				color: #282828;
			}
			
			.command {
				font-size: 1.5rem;
				margin-left: 1.3rem;
				margin-right: 1.3rem;
				box-sizing: border-box;
			}
			
			#tabs div:after{
			    content: "";
			    position: absolute;
			    display: block;
			    width: 0;
			    height: .25rem;
			    background-color: #282828;
			    bottom: 0;
			    left: 50%;
			    transition: all .4s;
			    transform: translate(-50%,0);
			    -webkit-transform: translate(-50%,0);
			}
			#tabs div.active:after{
				width: 1.5rem;
				border-radius: 5px;
				height: .5rem;
			}
			.dd{
				font-size:18px;
			}
			.hide{
				display: none;
			}
			.list_mine{
				display: flex;
			}
			.list_mine_book2{
				width: 10rem;
				height: 10rem;
				padding:0rem;
				margin-right: 1.5rem;
			}
			.list_mine_book2 img{
				width:10rem;
				height: 10rem;
				border-radius: 4px;
				box-shadow: 3px 3px 3px #e6e6e6;
			}
			.list_mine_book{
				width: 9.17rem;
				height: 12rem;
				padding:0rem;
				margin-right: 1.5rem;
			}
			.list_mine_book img{
				 width:9.17rem;
				 height: 12rem;
				 border-radius: 4px;
				 box-shadow: 3px 3px 3px #e6e6e6;
			 }
			.list_mine_detail{
				height:9.17rem;
				position: relative;
				top:0rem;
				padding: 0.2rem 0.6rem 0.5rem 0;
				-webkit-flex: 1;
				flex: 1;
			}
			.list_mine_detail span:nth-child(1){
				position: relative;left:0rem;margin: 0;font-size: 1.5rem;line-height:1.7rem;
			}
			.list_mine_detail p{
				position: relative;top:0.5rem;line-height:1.5rem;font-size:1.3rem;color: #666;;
			}
			.list_mine_detail span:nth-child(2){
				position:absolute;bottom:0;left:0rem;color: #666;font-size: 1.3rem;line-height: 1.3rem;margin-top: .5rem;padding-right: .46rem;
			}
			.begin-read{
				position: absolute;
				right: 1.5rem;
				bottom: 0;
				width: 7.5rem;
				height: 3rem;
				background: #ffda43;
				border-radius: 100px;
				text-align: center;
				color: #333333;
				font-weight: bold;
				line-height: 3rem;
			}
		</style>
	</head>
	<body>
		<!--会员广告-->
		<div class="col-xs-12" id="vipAd" style="background: url(img/sjbj.png) no-repeat center center;background-size:100% 100%;padding:15px 15px 0;position: fixed;z-index:100;top:0;left:0;width: 100%;display: none;">
			<img src="img/img_author.png" class="user-icon" style="float:left;margin-right: 15px;border-radius: 50%;height:50px;width:50px;" alt="" />
			<img src="img/VIP1.png" class="vip-icon hide" style="position: absolute;left:38px;top:50px;width: 35px;" alt="" />
			<img src="img/VIP2.png" class="vip-icon-stop hide" style="position: absolute;left:38px;top:50px;width: 35px;" alt="" />
			<p style="color: #664d17;font-size: 16px;line-height:25px;margin:0" class="user-name"></p>
			<p style="color: #917841;font-size: 13px;line-height:20px;margin:0  65px;height:40px ;" class="vip-text"></p>
			<div id="openVip" style="position: absolute;right:5px;top:20px;background: url(img/xf.png) no-repeat center center;background-size:100% 100%;padding: 20px 40px;border-radius: 3px;display: none;">
				
			</div>
		</div>
		<div class="col-xs-12 empty" style="padding: 25% 0;margin-top:5.3rem;display: none;">
			
	      	<div align="center" class="col-xs-12" style="padding:0;margin: 2% 0;">
	         	 <a href="javascript:;" style="display:block;height: 20%;width: 30%">
	             	 <img src="icon/sj.png" style="width: 80px;height:80px;margin: 0;border: 0;vertical-align: middle;display: inline-block;margin-top: 50px;">
	        	  </a>
	      	</div>
	      	<div align="center" class="col-xs-12"style="padding-top: 1.2rem;">
	         	 <p style="font-size: 1.4rem;font-weight:400;color: #999;">还没有任何听书内容</p>
	      	</div>
	      	<div class="seeBookStore col-xs-6" style="display:none;font-size:14px;text-align:center;margin:10px 25%;line-height:40px;color: #fff;background: #ED8434;border-radius:3px ;">
	      		查看解读书库
	      	</div>
 	 	</div>
 	 	
	 	<div id="main" class="flex-con" style="position: absolute;display:none;width: 100%;padding-bottom: 4.17rem;top:80px;">
	 		<div id="tabs" style="height: 3.75rem;align-items: center;justify-content: space-around;font-size: 15px;color: #666;display: flex;background: #FFFFFF;position: fixed;top:80px;width: 100%;z-index: 99;">
				<div class="active" style="position: relative;width: 25%;text-align: center;height: 100%;line-height: 3.75rem;">全部</div>
				<div style="position: relative;width: 25%;text-align: center;height: 100%;line-height: 3.75rem;">听书</div>
				<div style="position: relative;width: 25%;text-align: center;height: 100%;line-height: 3.75rem;">小课</div>
				<div style="position: relative;width: 25%;text-align: center;height: 100%;line-height: 3.75rem;">精品课</div>
	 		</div>
			<div id="all" style="padding-top: 3.75rem;">
				<div class="content" id="content1"></div>
				<div class="content" id="content2" style="display: none;padding-top: 1rem;"></div>
				<div class="content" id="content3" style="display: none;"></div>
				<div class="content" id="content4" style="display: none;"></div>
			</div>
	 	</div>
	 	<div id="footer" class="border-t" style="position: fixed;bottom: 0;left: 0;z-index: 99;width: 100%;height: 4.9rem;">
	        <ul class="flex-wrap" style="height: 4.9rem;">
	            <li id="home" tapmode="hover" class="flex-con" style="height: 4.9rem;background-size: 2rem 2rem;line-height: 7.8rem; font-size: 1.3rem;">首页</li>
	            <li tapmode="hover" class="flex-con active" style="height: 4.9rem;background-size: 2rem 2rem;line-height: 7.8rem; font-size: 1.3rem;">书架</li>
	            <li tapmode="hover" id="info" class="flex-con" style="height: 4.9rem;background-size: 2rem 2rem;line-height: 7.8rem; font-size: 1.3rem;">我的</li>
	        </ul>
	    </div>
	</body>
	<script id="all_tem" type="text/html">
		{{each data}}
			{{if $value.type == 0}} 
				<div onclick="goTOThemeDetail({{$value.themeid}},({{$value.isorder||0}}))" class="col-xs-12 list_mine" style="min-height: 9.5rem;height:auto;width:100%;padding:1.5rem">
		            <div class=" list_mine_book">
		                    <img src="{{$value.themeimg | addUrl}}" style="">
		            </div>
		            <div class="list_mine_detail">
		                <span class="aui-ellipsis-2 " style="">{{$value.themename}}</span>
		                <p class="aui-ellipsis-2" style="">{{$value.contentabstract}}</p>
		                <span>{{$value.book_count}}本书</span>
		            </div>
		        </div>
			{{else if $value.type == 1}}
				<div onclick="goToBookDetail({{$value.themeid}},{{$value.videoauthorid}},{{$value.copywriter}})" book-data="{{$value.themeid}}" class="col-xs-12 list_mine" style="min-height: 12rem;height:auto;width:100%;padding:1.5rem;">
				    <div class=" list_mine_book">
				        <a href="javascript:;" style="display:block;height: 100%;">
				            <img src="{{$value.readingimg | addUrl}}">
				        </a>
				    </div>
				    <div class="list_mine_detail" style="position: relative;height:12rem;top:0rem;padding: 0.2rem 0.5rem 0.5rem 0rem;" onclick="">
				        <div class="col-xs-12" style="padding: 0;margin: 0;">
				            <p style="font-family: bolder;font-size: 1.6rem;color: #282828;">{{$value.readingname}}</p>
				            <p class="aui-ellipsis-2" style="font-size: 1.4rem;color: #666666;">{{$value.bookrecommend}}</p>
				        </div>
				        {{if progessArr1[$index] == 0}}
				        <div class="col-xs-7" style="padding: 0;margin: 0;position: absolute;bottom:1rem;left:0">
				            <p style="font-size: 1.3rem;color: #999999;margin: 0;">{{$value.videoduration}}</p>
				        </div>
				        {{else}}
				        <div class="col-xs-7" style="padding: 0;margin: 0;position: absolute;bottom:1rem;left:0">
				            <p style="font-size: 1.3rem;color: #999999;margin: 0;">{{$value.videoduration + " " + progessArr1[$index]}}</p>
				        </div>
				        {{/if}}
				        {{if userVip.type!=1&&$value.isorder!=1}}
						<div  class="cant-begin-read" data-bookid={{$value.themeid}} data-videoauthorid={{$value.videoauthorid}} data-copywriter={{$value.copywriter}} data-bookname={{$value.readingname}} data-bookimg={{$value.readingimg}} data-bookrecommend={{$value.bookrecommend}} style="position: absolute;right: 15px;bottom: 7px;width: 7.5rem;height:3rem;background: #999;border-radius: 100px;text-align: center;color: white;line-height: 3rem;">
							 开始听书
						</div>
						{{else}}
				         <div class="begin-read" data-bookid={{$value.themeid}} data-videoauthorid={{$value.videoauthorid}} data-copywriter={{$value.copywriter}} data-bookname={{$value.readingname}} data-bookimg={{$value.readingimg}} data-bookrecommend={{$value.bookrecommend}}>
							开始听书
						</div>
						{{/if}}
				    </div>
				</div>
				{{else if $value.type == 2}}
				<div onclick="goToSmallCourseDetail({{$value.themeid}},{{$value.videoauthorid}},{{$value.copywriter}})" class="col-xs-12 list_mine" style="min-height: 9.5rem;height:auto;width:100%;padding:1.5rem;">
		            <div class=" list_mine_book2">
		                    <img src="{{$value.readingimg | addUrl}}">
		            </div>
		            <div class="list_mine_detail list_mine_detail" style="height:9.17rem;position: relative;top:0rem;padding: 0.2rem 1.5rem 0.5rem 0rem;">
		                <span class="aui-ellipsis-2 " style="position: relative;left:0rem;margin: 0;font-size: 1.5rem;line-height:1.7rem;">{{$value.readingname}}</span>
		                <p class="aui-ellipsis-2" style="position: relative;top:0.5rem;line-height:1.5rem;font-size:1.3rem;color: #666;margin-top: 0.33rem;height: 2.8rem;margin-bottom: 0;">{{$value.bookrecommend}}</p>
		                <span style="position:absolute;bottom:0;color: #999;font-size: 1.3rem;line-height: 1.3rem;margin-top: .5rem;padding-right: .46rem;">共{{$value.bookchapter_list.length}}节</span>
		            </div>
		        </div>
			{{/if}}
		{{/each}}
	</script>
	<script id="shubao_tem" type="text/html">
		{{each data}}
			{{if $value.type == 0}} 
				<div onclick="goTOThemeDetail({{$value.themeid}},({{$value.isorder||0}}))" class="col-xs-12 list_mine" style="min-height: 9.5rem;height:auto;width:100%;padding:1.5rem;">
		            <div class=" list_mine_book">
		                <a href="javascript:;" style="text-decoration: none;">
		                    <img src="{{$value.themeimg | addUrl}}">
		                </a>
		            </div>
		            <div class="list_mine_detail" style="height:9.17rem;position: relative;top:0rem;padding: 0.2rem 1.5rem 0.5rem 0rem;">
		                <span class="aui-ellipsis-2 " style="position: relative;left:0rem;margin: 0;font-size: 1.5rem;line-height:1.7rem;">{{$value.themename}}</span>
		                <p class="aui-ellipsis-2" style="position: relative;top:0.5rem;line-height:1.5rem;font-size:1.3rem;color: #666;margin-top: 0.33rem;height: 2.8rem;margin-bottom: 0;">{{$value.contentabstract}}</p>
		                <span style="position:absolute;bottom:0;left:1.0rem;color: #999;font-size: 1.3rem;line-height: 1.3rem;margin-top: .5rem;padding-right: .46rem;">{{$value.book_count}}本书</span>
		            </div>
		        </div>
			{{/if}}
		{{/each}}
	</script>
	
	<script id="smallCourse_item" type="text/html">
		{{each data}}
			{{if $value.type == 2}} 
				<div onclick="goToSmallCourseDetail({{$value.themeid}},{{$value.videoauthorid}},{{$value.copywriter}})" class="col-xs-12 list_mine" style="min-height: 9.5rem;height:auto;width:100%;padding:1.5rem;">
		            <div class=" list_mine_book2">
		                    <img src="{{$value.readingimg | addUrl}}">
		            </div>
		            <div class="list_mine_detail" style="height:9.17rem;position: relative;top:0rem;padding: 0.2rem 1.5rem 0.5rem 1.0rem;">
		                <span class="aui-ellipsis-2 " style="position: relative;left:0rem;margin: 0;font-size: 1.5rem;line-height:1.7rem;">{{$value.readingname}}</span>
		                <p class="aui-ellipsis-2" style="position: relative;top:0.5rem;line-height:1.5rem;font-size:1.3rem;color: #666;margin-top: 0.33rem;height: 3.8rem;margin-bottom: 0;">{{$value.bookrecommend}}</p>
		                <span style="position:absolute;bottom:0;left:1.0rem;color: #999;font-size: 1.3rem;line-height: 1.3rem;margin-top: .5rem;padding-right: .46rem;">共{{$value.bookchapter_list.length}}节</span>
		            </div>
		        </div>
			{{/if}}
		{{/each}}
	</script>
	
	<script id="danben_tem" type="text/html">
		{{each data}}
			{{if $value.type == 1}}
				<div onclick="goToBookDetail({{$value.themeid}},{{$value.videoauthorid}},{{$value.copywriter}})" class="col-xs-12 list_mine" style="min-height: 12rem;height:auto;width:100%;padding:1.5rem;">
				    <div class=" list_mine_book" >
				        <a href="javascript:;" style="display:block;height: 100%;">
				            <img src="{{$value.readingimg | addUrl}}">
				        </a>
				    </div>
				    <div class="list_mine_detail" style="position: relative;height:12rem;top:0rem;padding: 0.2rem 1.5rem 0.5rem 0rem;" onclick="">
				        <div class="col-xs-12" style="padding:0;position:relative;left:0rem;margin: 0;height:12rem;">
				            <p style="font-family: bolder;font-size: 1.6rem;color: #282828">{{$value.readingname}}</p>
				            <p class="aui-ellipsis-2" style="font-size: 1.4rem;color: #666666;">{{$value.bookrecommend}}</p>
				        </div>
				        {{if progessArr[$index - 1] == 0}}
				        <div class="col-xs-7" style="padding: 0;margin: 0;position: absolute;bottom:7px;left:0">
				            <p style="font-size: 1.3rem;color: #999999;margin: 0;">{{$value.videoduration}}</p>
				        </div>
				        {{else}}
				        <div class="col-xs-7" style="padding: 0;margin: 0;position: absolute;bottom:7px;left:0">
				            <p style="font-size: 1.3rem;color: #999999;margin: 0;">{{$value.videoduration + " " + progessArr[$index - 1]}}</p>
				        </div>
				        {{/if}}
				         {{if userVip.type!=1&&$value.isorder!=1}}
				         <div class="cant-begin-read" data-bookid={{$value.themeid}} data-videoauthorid={{$value.videoauthorid}} data-copywriter={{$value.copywriter}}  style="position: absolute;right: 15px;bottom: 7px;width: 7.5rem;height:3rem;background: #999;border-radius: 100px;text-align: center;color: white;line-height: 3rem;">
							开始听书
						</div>
						{{else}}
				        <div class="begin-read" data-bookid={{$value.themeid}} data-videoauthorid={{$value.videoauthorid}} data-copywriter={{$value.copywriter}} data-bookname={{$value.readingname}} data-bookimg={{$value.readingimg}} data-bookrecommend={{$value.bookrecommend}} style="position: absolute;right: 15px;bottom: 7px;width: 7.5rem;height:3rem;background: #ffda43;border-radius: 100px;text-align: center;color: #333333;font-weight: bold; line-height: 3rem;">
							开始听书
						</div>
						{{/if}}
				    </div>
				</div>
			{{/if}}

		{{/each}}
	</script>
	
</html>
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="js/jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/purl.js"></script>
<script src="js/md5.js" type="text/javascript" charset="utf-8"></script>
<script src="js/aui-toast.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	
	var toast = new auiToast();
	toast.loading({
		title: "加载中",
		duration: 2000
	});
	
	var imgHosturl = "http://img.readerday.com/cover/";
	
	function goToBookDetail(id,videoauthorid,copywriter){
		window.location.href = "bookDetail.html?bookid="+id+"&videoauthorid="+videoauthorid+"&copywriter="+copywriter
	}	
	function goTOThemeDetail(id,isorder){
		if(isorder==1){
			window.location.href = "themeDetail.html?themeisorder=1&themeId="+id;
		}else{
			window.location.href = "themeDetail.html?themeId="+id;
		}
	}
	
	function goToSmallCourseDetail(id,videoauthorid,copywriter){
		window.location.href = "smallCourseDetail.html?bookid="+id+"&videoauthorid="+videoauthorid+"&copywriter="+copywriter
	}
	
	function ascli(url){
		var param = url.split("?")[1].split("&");
		param.sort();
		str = param.join("&")+"&key=wwdxreaderwhat0823";
		return url+"&sign="+hex_md5(str).toUpperCase();
	}
	
	$(function() {
		
		var getBookshelfData=function(){
			$.ajax({
				type:"get",
				url:ascli(hostUrl+"user/purchase?token="+JSON.parse(window.sessionStorage.getItem("weixinData")).data.userInfo.token)+"&rand="+new Date().getTime(),
				async:true,
				success:function(data){
					toast.hide();
					if(data.status==0&&data.data){
						data.userVip=userVip;
						$("#main").show();
						$(".empty").hide();
						var bookArr = new Array();
						for (var i = 0; i < data.data.length; i ++) {
							if (data.data[i].type == 1) {//单本书籍
								bookArr.push(data.data[i]);
							}
						}
						
						if (window.localStorage) {
					var progess;
					var bookid;
					var bookCount;
					var progessStr;
					var progessArr = new Array();
					for (var i = 0; i < bookArr.length; i ++) {
						bookid = bookArr[i]["themeid"];
						bookCount = localStorage.getItem(bookid + "_count");
						bookCount = parseInt(bookCount);
						progess = 0;
						if (bookCount) {
							for (var j = 0; j < bookCount; j ++) {
								var value = localStorage.getItem(bookid + "_" + j);
								if (value) {
									var timeArr = value.split("_");
									if (timeArr.length == 2) {
										currentTime = parseInt(timeArr[0]);
			                            duration = parseInt(timeArr[1]);
			                            progess += parseInt((currentTime * 100) / duration);
									}
								}
								if (j == bookCount - 1) {
									if (progess == 0 || !progess) {
			                        	   progessStr = "0";
			                        	}else {
			                        		if (parseInt(progess / bookCount) >= 100) {
			                        			progessStr = "已听完";
			                        		}else {
			                        			progessStr = "已听" + parseInt(progess / bookCount) + "%";
			                        		}
			                        	}
			                    }
							}
						} else{
							progessStr = "0";
						}
						progessArr.push(progessStr);
					}
				}
				data.progessArr = progessArr;
				
				if (window.localStorage) {
					var progess;
					var bookid;
					var bookCount;
					var progessStr;
					var progessArr1 = new Array();
					for (var i = 0; i < data.data.length; i ++) {
						bookid = data.data[i]["themeid"];
						bookCount = localStorage.getItem(bookid + "_count");
						bookCount = parseInt(bookCount);
						progess = 0;
						if (bookCount) {
							for (var j = 0; j < bookCount; j ++) {
								var value = localStorage.getItem(bookid + "_" + j);
								if (value) {
									var timeArr = value.split("_");
									if (timeArr.length == 2) {
										currentTime = parseInt(timeArr[0]);
			                            duration = parseInt(timeArr[1]);
			                            progess += parseInt((currentTime * 100) / duration);
									}
								}
								if (j == bookCount - 1) {
									if (progess == 0 || !progess) {
			                        	   progessStr = "0";
			                        	}else {
			                        		if (parseInt(progess / bookCount) >= 100) {
			                        			progessStr = "已听完";
			                        		}else {
			                        			progessStr = "已听" + parseInt(progess / bookCount) + "%";
			                        		}
			                        	}
			                    }
							}
						} else{
							progessStr = "0";
						}
						progessArr1.push(progessStr);
					}
				}
				data.progessArr1 = progessArr1;
						
						var html = template("all_tem",data);
						document.getElementById('content1').innerHTML = html;
						
						var html1 = template("danben_tem",data);
						document.getElementById('content2').innerHTML = html1;
						
						var html2 = template("smallCourse_item",data);
						document.getElementById('content3').innerHTML = html2;
						
						var html3 = template("shubao_tem",data);
						document.getElementById('content4').innerHTML = html3;
					}else {
						$(".empty").show();
					}
				}
			});
			//会员广告信息
			var userInfo=JSON.parse(sessionStorage.getItem('weixinData')).data.userInfo
			$('#vipAd .user-name').text(userInfo.nickname)
			$('#vipAd .user-icon').attr('src',userInfo.headImgUrl);
			if(!userVip.expire_time){
				$('#openVip').css('background','url(img/kt.png)').css('background-size','100% 100%').show();
				$('#vipAd .vip-text').text('开通会员，畅听全站好书')
			}else{
				var beginDate=userVip.effect_time
				var endDate=userVip.expire_time;
				
				if(new Date(endDate).getTime()-new Date().getTime()<0){
					$('#openVip').css('background','url(img/xf.png) no-repeat center center').css('background-size','100% 100%').show();
					$('.vip-icon-stop').removeClass('hide')
					$('#vipAd .vip-text').text('你的蜜读VIP已到期，需要续费才能继续阅读')
				}else{
					$('.vip-icon').removeClass('hide')
					$('#vipAd .vip-text').text('有效期: '+beginDate.replace(/-/g,'.')+'-'+endDate.replace(/-/g,'.'))
				}
			}
		}
		getToken(getBookshelfData);
		$('#tabs div').on('click',function(){
	      $('#tabs div').removeClass('active');
	      $(this).addClass('active');
	      var index = $(this).index();
	      if(index>0){
	      	if(index==1){
	      		$('.seeBookStore').text('查看全部主题')
	      	}else if(index==2){
	      		$('.seeBookStore').text('查看解读书库')
	      	}
	      	$('.seeBookStore').show()
	      }else{
	      	$('.seeBookStore').hide()
	      }
	      $(".content").eq(index).show().siblings().hide();
		})
		
		$("#home").click(function(){
			location.href = "index.html";
		})
		$("#info").click(function(){
			location.href = "info.html";
		})
		$('body').on('click','.begin-read',function(e){
			e.stopPropagation()
			location.href = "chapter.html?bookid=" + $(this).attr('data-bookid') + "&videoauthorid=" +  $(this).attr('data-videoauthorid') + "&copywriter=" +  $(this).attr('data-copywriter') + "&themeisorder=1&bookname="+$(this).attr('data-bookname')+"&bookimg=" + $(this).attr('data-bookimg');
		})
		
		$('#vipAd').show();
		$('#openVip').on('click',function(){
			location.href="memberPage.html"
		})
	})
	
	
</script>